﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using VQWEB.administrator.sources;
using VQData;

namespace VQWEB.administrator.english.tabletime
{
    public partial class tabletime_add : System.Web.UI.Page
    {
        EnglishData EnglishData = new EnglishData();
        eng_tabletime eng_tabletime = null;
        int Id = 0;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (RouteData.Values["Id"] != null)
                int.TryParse(RouteData.Values["Id"].ToString(), out Id);
            if (Id > 0)
            {
                frmTableTime.DefaultMode = FormViewMode.Edit;
                eng_tabletime = EnglishData.GetTableTimeById(Id);
                frmTableTime.DataSource = new List<eng_tabletime> { eng_tabletime };
                frmTableTime.DataBind();
            }
            else frmTableTime.DefaultMode = FormViewMode.Insert;
        }
    }
}